package com.huangge1199.common.ex;

import lombok.Data;

/**
 * @Author: huang
 * @Description TODO
 * @Date: 2021-01-02 15:27
 */
@Data
public class BaseException extends Exception{

    private String code;
    private String msg;

    /**
     * 抛出异常
     * @param msg 异常信息
     */
    public BaseException(String msg) {
        super(msg);
        this.msg = msg;
    }

    /**
     * 抛出异常
     * @param msg 异常信息
     * @param e 异常栈信息
     */
    public BaseException(String msg, Throwable e) {
        super(msg, e);
        this.msg = msg;
    }

    public BaseException(String code,String msg){
        this.code = code;
        this.msg = msg;
    }
}
